package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the AUD_AFILIACION database table.
 * 
 */
@Entity
@Table(name="AUD_AFILIACION")
public class AudAfiliacion implements Serializable {
	private static final long serialVersionUID = 1L;
	private long audAfilId;
	private String fgWeb;
	private BigDecimal personaId;
	private String tipoAfil;
	private OficRegistral oficRegistral;
	private Transaccion transaccion;
	private Contrato contrato;

    public AudAfiliacion() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="AUD_AFIL_ID", unique=true, nullable=false)
	public long getAudAfilId() {
		return this.audAfilId;
	}

	public void setAudAfilId(long audAfilId) {
		this.audAfilId = audAfilId;
	}


	@Column(name="FG_WEB", length=1)
	public String getFgWeb() {
		return this.fgWeb;
	}

	public void setFgWeb(String fgWeb) {
		this.fgWeb = fgWeb;
	}


	@Column(name="PERSONA_ID")
	public BigDecimal getPersonaId() {
		return this.personaId;
	}

	public void setPersonaId(BigDecimal personaId) {
		this.personaId = personaId;
	}


	@Column(name="TIPO_AFIL", nullable=false, length=1)
	public String getTipoAfil() {
		return this.tipoAfil;
	}

	public void setTipoAfil(String tipoAfil) {
		this.tipoAfil = tipoAfil;
	}


	//bi-directional many-to-one association to OficRegistral
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID"),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID")
		})
	public OficRegistral getOficRegistral() {
		return this.oficRegistral;
	}

	public void setOficRegistral(OficRegistral oficRegistral) {
		this.oficRegistral = oficRegistral;
	}
	

	//bi-directional many-to-one association to Transaccion
    @ManyToOne
	@JoinColumn(name="TRANS_ID", nullable=false)
	public Transaccion getTransaccion() {
		return this.transaccion;
	}

	public void setTransaccion(Transaccion transaccion) {
		this.transaccion = transaccion;
	}
	

	//bi-directional many-to-one association to Contrato
    @ManyToOne
	@JoinColumn(name="NUM_CONT")
	public Contrato getContrato() {
		return this.contrato;
	}

	public void setContrato(Contrato contrato) {
		this.contrato = contrato;
	}
	
}